<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Qyer商业搜索服务(Rukawa)</title>
  <link rel="stylesheet" href="/bs/bs/css/bootstrap.min.css">
  <link rel="stylesheet" href="/bs/bs/css/bootstrap-theme.min.css">
  <link rel="shortcut icon" href="http://www.qyer.com/favicon.ico"/>
  <link rel="stylesheet"
        href="http://home.qyerstatic.com/css/base_css.f302854e54b8e38c354077429058f8f8.css"/>
  <link rel="stylesheet"
        href="http://home.qyerstatic.com/css/home_css.9d70bdefbec2a6b753532724cd6f478d.css"/>
  <script src="/bs/bs/js/bootstrap.min.js"></script>
</head>
<body>
<div class="header">
</div>
<br/>

<div class="container">
  <pre style="font-size:1.0em;font-family: pt mono,courier new,consolas,monospace;textAlign:center">

                                            _______             _         _______             _______
                                           (  ____ ) |\     /| | \    /\ (  ___  ) |\     /| (  ___  )
                                           | (    )| | )   ( | |  \  / / | (   ) | | )   ( | | (   ) |
                                           | (____)| | |   | | |  (_/ /  | (___) | | | _ | | | (___) |
                                           |     __) | |   | | |   _ (   |  ___  | | |( )| | |  ___  |
                                           | (\ (    | |   | | |  ( \ \  | (   ) | | || || | | (   ) |
                                           | ) \ \__ | (___) | |  /  \ \ | )   ( | | () () | | )   ( |
                                           |/   \__/ (_______) |_/    \/ |/     \| (_______) |/     \|
  </pre>
  <legend><span style="font-size:1.4em;">通用商业搜索说明文档</span></legend>
  <p class="lead">该功能是由数据中心实现的统一的垂直商业搜索接口. 提供如下功能:</p>
  <ul class="list-group">
    <li class="list-group-item"><h5>分词(简单分隔)</h5></li>
    <li class="list-group-item"><h5>重点词汇翻译, 包括国家, 城市, 常用同义词词典所对应的英文(如果有), 汉语拼音</h5></li>
    <li class="list-group-item"><h5>关键词搜索</h5></li>
    <li class="list-group-item"><h5>按类目(两级)、出发地、出发时间、供应商、channel筛选</h5></li>
    <li class="list-group-item"><h5>优化排序</h5></li>
  </ul>
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">调用地址(Method=get)</h3>
    </div>
    <div class="panel-body">
      <p class="list-group-item-text"
         style="font-weight:bold;font-size:1.5em; font-family: pt mono,menlo,monospace;">
        http://rukawa.qyer.com/bs/search
      </p>
    </div>
  </div>
  <p class="lead">搜索规则说明</p>
  <ol class="list-group">
    <li class="list-group-item"><h5>筛选条件与搜索关键字至少指定一种, 不支持无条件查询</h5></li>
    <li
      class="list-group-item"><h5>关键词的匹配域是标题与标签, 其中标签由商业运营中心填写, 以及数据中心算法引擎基于标题/正文等特征提取.</h5></li>
    <li class="list-group-item"><h5>关键词的匹配的规则是<span class="text-danger">单词匹配</span>而非字匹配, 如<span
      class="text-danger">东京</span>只会匹配东京的结果而不会匹配<span class="text-danger">东北</span>或<span
      class="text-danger">京都</span></h5></li>
    <li class="list-group-item"><h5>除两级类目外，多个筛选条件之间为<span class="text-danger">合取(and)</span>关系,两级类目根据两级目录的隶属关系确定其逻辑关系(若二级类目隶属于一级类目，则是合取关系，否则则为析取关系;若存在多个同级目录，则同级类目间是析取关系)，
      关键词的2个匹配域之间为<span class="text-danger">析取(or)</span>关系, 筛选条件与关键词之间为<span class="text-danger">合取(and)</span>关系
    </h5></li>
    <li class="list-group-item"><h5>商品会做有效性判断. 数据中心会定时(目前的时间间隔<=1分钟)检索商业产品主表, 观察其在售状态并同步到校验模块.
      只有<code>status</code>=<code>0</code>, 且<code>onsale</code>=<code>1</code>的商业产品才会出现在搜索结果中.</h5>
    </li>
    <li class="list-group-item"><h5>目前的排序规则同最世界其他接口, 如Nobita系统中的reorder2, 都是基于GMV预估</h5></li>
  </ol>
  <p id="search_frame" class="lead">参数表以及测试表单 - 点击查询测试搜索效果</p>

  <form action="/bs/search" method="get" class="search">
    <input type="hidden" name="context" value="test"/>
    <input type="hidden" name="uid" value="10001"/>
    <input type="hidden" name="guid" value="test"/>
    <table class="table table-bordered table-hover">
      <thead>
      <tr>
        <th>参数名</th>
        <th>描述</th>
        <th>值类型</th>
        <th>必选</th>
        <th>
          <input type="submit" id="singlebutton" class="btn btn-default" value="查询"/>
        </th>
      </tr>
      <tr>
      </thead>
      <tbody>
      <tr>
        <td colspan="5" style="background-color:#f4f4f4;"><p class="text-center"
                                                             style="font-weight:bold;font-size:1.4em;">
          结果展示参数</p></td>
      </tr>
      <tr>
        <td>only_data</td>
        <td><big>展现模式</big> - 使用纯Json数据模式或内定模板的调试模式</td>
        <td>boolean</td>
        <td>否</td>
        <td>
          <select id="select-show-mode" name="only_data" class="form-control">
            <option value="false">预览模式</option>
            <option value="true">Json数据模式</option>
          </select>
        </td>
      </tr>
      <tr>
        <td>simple</td>
        <td><big>展现模式</big> - 是否是简洁的数据模式(下有例子)</td>
        <td>boolean</td>
        <td>否</td>
        <td>
          <select id="select-data-mode" name="simple" class="form-control">
            <option value="true">简洁模式(只有关键ID)</option>
            <option value="false" selected="selected">丰富模式(标题, 标签, 各级类目)</option>
          </select>
        </td>
      </tr>
      <tr>
        <td>basic</td>
        <td><big>展现模式</big> - 是否是基础数据模式(带地理信息)(下有例子)</td>
        <td>boolean</td>
        <td>否</td>
        <td>
          <select id="select-data-mode-basic" name="basic" class="form-control">
            <option value="true">基础模式(带地理信息)</option>
            <option value="false" selected="selected">非基础模式(简洁模式或富模式)</option>
          </select>
        </td>
      </tr>

      <tr>
        <td>meta_info</td>
        <td><big>展现模式</big> - 是否需要元信息(统计信息)</td>
        <td>boolean</td>
        <td>否</td>
        <td>
          <select id="select-data-mode-meta" name="meta_info" class="form-control">
            <option value="true">元信息(统计信息)</option>
            <option value="false" selected="selected">不带元信息</option>
          </select>
        </td>
      </tr>

      <tr>
        <td>blend_all</td>
        <td><big>混排结果</big> - 按一级类目分开/混排搜索结果</td>
        <td>boolean</td>
        <td>否</td>
        <td>
          <select id="select-blend-mode" name="blend_all" class="form-control">
            <option value="false" selected="selected">按一级类目分开</option>
            <option value="true">混排结果</option>
          </select>
        </td>
      </tr>
      <tr>
        <td colspan="5" style="background-color:#f4f4f4;"><p class="text-center"
                                                             style="font-weight:bold;font-size:1.4em;">
          搜索引擎参数</p></td>
      </tr>
      <tr>
        <td>kw</td>
        <td><big>搜索关键词</big> - 多个搜索关键词可以按空格, 各种标点符号分开</td>
        <td>string</td>
        <td>否</td>
        <td><input type="text" name="kw" class="form-control" value=""
                   placeholder="搜索国家, 城市, 玩法, 产品"/></td>
      </tr>
      <tr>
        <td>type1</td>
        <td><big>筛选条件</big> - 由商业中心定义的一级类目<br>1016:机票&nbsp;&nbsp;&nbsp;&nbsp;1017:酒店&nbsp;&nbsp;1018:自由行&nbsp;&nbsp;1020:邮轮<br>2410:当地玩乐&nbsp;&nbsp;1021:租车&nbsp;&nbsp;1049:保险&nbsp;&nbsp;1785:签证</td>
        <td>string</td>
        <td>否</td>
        <td><input type="text" name="type1" class="form-control" value=""
                   placeholder="多个type1之间以英文逗号分隔(1016,1017)"/></td>
      </tr>
      <tr>
        <td>type2</td>
        <td><big>筛选条件</big> - 由商业中心定义的一级类目<br>2375:WIFI/电话卡&nbsp;&nbsp;&nbsp;2376:接送机/拼车/包车<br>2377:公园/景点门票&nbsp;&nbsp;&nbsp;2378:按摩/SPA<br>2379:特色活动&nbsp;&nbsp;&nbsp;2380:美食/厨艺<br>2381:演出/赛事&nbsp;&nbsp;&nbsp;2382:交通票券/城市通票<br>2369:海岛/出海&nbsp;&nbsp;&nbsp;2371:自然景观<br>2372:人文体验&nbsp;&nbsp;&nbsp;2373:购物/折扣券<br>2831:CityWalk&nbsp;&nbsp;&nbsp;2830:发现城市</td>
        <td>string</td>
        <td>否</td>
        <td><input type="text" name="type2" class="form-control" value=""
                   placeholder="多个type2之间以英文逗号分隔(2375,2376)"/></td>
      </tr>
      <tr>
        <td>supplier_id</td>
        <td><big>筛选条件</big> - 供应商</td>
        <td>int</td>
        <td>否</td>
        <td><input type="text" name="supplier_id" class="form-control" value=""
                   placeholder="供应商id"/></td>
      </tr>
      <tr>
        <td>source_place</td>
        <td><big>筛选条件</big> - 出发地</td>
        <td>string</td>
        <td>否</td>
        <td>
          <select id="select-source-place" name="source_place" class="form-control">
            <option value="">全部</option>
            <option value="bjtj">bjtj</option>
            <option value="shhz">shhz</option>
            <option value="gzsz">gzsz</option>
            <option value="cdcq">cdcq</option>
            <option value="inland">inland</option>
            <option value="hmt">hmt</option>
            <option value="abroad">abroad</option>
          </select>
        </td>
      </tr>

      <tr>
        <td>dest</td>
        <td><big>筛选条件</big> - 目的地</td>
        <td>string</td>
        <td>否</td>
        <td><input type="text" name="dest" class="form-control" value=""
                   placeholder="目的地"/></td>
      </tr>

      <tr>
        <td>f_country_id</td>
        <td><big>筛选条件</big> - 目的地国家(单个)</td>
        <td>int</td>
        <td>否</td>
        <td>
          <select id="select-country-id" name="f_country_id" class="form-control">
            <option value="">全部</option>
          </select>
        </td>
      </tr>
      <tr>
        <td>f_city_id</td>
        <td><big>筛选条件</big> - 目的地城市(单个)</td>
        <td>int</td>
        <td>否</td>
        <td>
          <select id="select-city-id" name="f_city_id" class="form-control">
            <option value="">全部</option>
          </select>
        </td>
      </tr>

      <tr>
        <td colspan="5" style="background-color:#f4f4f4;"><p class="text-center"
                                                             style="font-weight:bold;font-size:1.4em;">
          过滤参数</p></td>
      </tr>

      </tr>
      <tr>
        <td>sort</td>
        <td><big>筛选条件</big> - sort<br>1代表按销量升序排列<br>2代表按销量降序排序<br>3代表按价格升序排序<br>4代表按价格降序排序<br>默认为0，按GMV排序</td>
        <td>int</td>
        <td>否</td>
        <td><input type="text" name="sort" class="form-control" value=""
                   placeholder="排序方式"/></td>
      </tr>
      <tr>
        <td>from</td>
        <td><big>筛选条件</big> - 起始时间<br>格式:yyyyMMdd</td>
        <td>int</td>
        <td>否</td>
        <td><input type="text" name="from" class="form-control" value=""
                   placeholder="起始时间,20160701"/></td>
      </tr>
      <tr>
        <td>to</td>
        <td><big>筛选条件</big> - 结束时间<br>当起始和结束时间都为空时，表示全部<br>其中之一为空时：当起始时间为空，接口会将起始时间置为调用接口当日<br>当结束时间为空，接口会将结束时间置为无限制<br>其中from为闭区间，to为开区间<br>格式:yyyyMMdd<br>例子，from=20160801，to=20160901，[20160801,20160901)</td>
        <td>int</td>
        <td>否</td>
        <td><input type="text" name="to" class="form-control" value=""
                   placeholder="结束时间,20160801"/></td>
      </tr>
      <tr>
        <td>limit</td>
        <td><big>筛选条件</big> - limit<br>数字，默认不做limit限制</td>
        <td>int</td>
        <td>否</td>
        <td><input type="text" name="limit" class="form-control" value=""
                   placeholder="数量限制"/></td>
      </tr>

      <tr>
        <td>channel</td>
        <td><big>筛选条件</big> - channel,包括web、h5、mobile、app,多个channel以英文逗号分隔</td>
        <td>string</td>
        <td>否</td>
        <td><input type="text" name="channel" class="form-control" value=""
                   placeholder="web,h5,mobile,app"/></td>
      </tr>

      <tr>
        <td colspan="5" style="background-color:#f4f4f4;"><p class="text-center"
                                                             style="font-weight:bold;font-size:1.4em;">
          常规参数</p></td>
      </tr>
      <tr>
        <td>uid</td>
        <td><big>常规参数</big> - uid</td>
        <td>string</td>
        <td>是(如果有)</td>
        <td>test</td>
      </tr>
      <tr>
        <td>guid</td>
        <td><big>常规参数</big> - guid</td>
        <td>string</td>
        <td>是</td>
        <td>10001</td>
      </tr>
      <tr>
        <td>context</td>
        <td><big>常规参数</big> - 标识搜索接口的使用场景</td>
        <td>string</td>
        <td>是</td>
        <td>test</td>
      </tr>
      </tbody>
    </table>
  </form>
  <hr/>
  <p class="lead">返回格式说明</p>

  <p class="lead">富信息模式</p>
<pre><code>
  {
  "namespace": "test",
  "status": 0,
  "msg": "ok",
  "data": {
  "strategy": "GMV-PRIORITY",
  "content": [
  {
  "skus": [
  {
  "lid": 61289,
  "title": "【1212特惠】小城故事多*体味清迈经典双人多日游(丛林飞跃/骑大象)",
  "type1": 2410,
  "type2": 2379,
  "tags": [
  "穷游泰国清迈",
  "siyuezhou",
  "亲子",
  "情侣",
  "丛林飞跃",
  "摄影"
  ]
  }
  ],
  "skus_size": 1,
  "type1": 2410
  }
  ],
  "request_id": "5a13dc98cd110fabf684f031be92eccc0cefedc8"
  },
  "service_name": "rukawa",
  "time": 94,
  "meta_info": {
  "type_info": {},
  "dest_info": {}
  }
  }
</code></pre>
  <br/>
  <p class="lead">基础模式</p>
<pre><code>
  {
  "namespace": "0.5",
  "status": 0,
  "msg": "ok",
  "data": {
  "strategy": "GMV-PRIORITY",
  "content": [
  {
  "skus": [
  {
  "lid": 69088,
  "type1": 1017,
  "type2": 0,
  "countries": [
  236
  ],
  "cities": [
  8163,
  8129
  ],
  "continents": [
  234
  ]
  }
  ],
  "skus_size": 1,
  "type1": 1017
  },
  {
  "skus": [
  {
  "lid": 63258,
  "type1": 1018,
  "type2": 0,
  "countries": [
  236
  ],
  "cities": [
  8009,
  71
  ],
  "continents": [
  234
  ]
  },
  {
  "lid": 65308,
  "type1": 1018,
  "type2": 0,
  "countries": [
  236,
  422
  ],
  "cities": [
  6890
  ],
  "continents": [
  234,
  239
  ]
  },
  {
  "lid": 63394,
  "type1": 1018,
  "type2": 0,
  "countries": [
  236
  ],
  "cities": [
  8163
  ],
  "continents": [
  234
  ]
  },
  {
  "lid": 61362,
  "type1": 1018,
  "type2": 0,
  "countries": [
  236,
  422
  ],
  "cities": [
  6890
  ],
  "continents": [
  234,
  239
  ]
  }
  ],
  "skus_size": 4,
  "type1": 1018
  }
  ],
  "request_id": "ac20530161cc83d5e189cfecbf86a694be2ba867c2e6b3ca131ccc75256b6740"
  },
  "service_name": "rukawa",
  "time": 45,
  "meta_info": {
  "type_info": {},
  "dest_info": {}
  }
  }
</code></pre>
  <br/>
  <p class="lead">简单id模式(序列化速度快)</p>
<pre><code>
  {
  "namespace": "test",
  "status": 0,
  "msg": "ok",
  "data": {
  "strategy": "GMV-PRIORITY",
  "content": [
  {
  "skus": [
  {
  "lid": 61289,
  "type2": 2379
  }
  ],
  "skus_size": 1,
  "type1": 2410
  }
  ],
  "request_id": "5a13dc98cd110fabf684f031be92eccc0cefedc8"
  },
  "service_name": "rukawa",
  "time": 94,
  "meta_info": {
  "type_info": {
  },
  "dest_info": {
  }
  }
  }
</code></pre>
</div>
<br/>

<div class="footer">
  <div class="footer-line"></div>
  <div class="footer-wrap-black">
    <div class="footer-inner2">
      <div class="footer-copyright">
        <a href="http://www.qyer.com/" rel="nofollow" data-bn-ipg="foot-logo"><img
          src="http://home.qyerstatic.com/common/images/home/logo_gray_r.png" width="84" height="36"
          alt="穷游网"></a>

        <p>2004-2016 © 穷游网® qyer.com All rights reserved. Version v5.57&nbsp;&nbsp;<a
          href="http://www.miibeian.gov.cn/" target="_blank" rel="nofollow">京ICP备12003524号</a>&nbsp;&nbsp;京公网安备11010502023470&nbsp;&nbsp;京ICP证140673号
        </p>

        <p><a href="http://www.qyer.com/">穷游网</a>为<a href="http://www.qyer.com/">旅行</a>者提供原创实用的<a
          href="http://www.qyer.com/">出境游</a><a href="http://place.qyer.com/">旅行指南</a>和<a
          href="http://place.qyer.com/">旅游攻略</a>、<a href="http://bbs.qyer.com/">旅行社区</a>和<a
          href="http://ask.qyer.com/">问答</a>交流平台，并提供<a href="http://qyer.ailvxing.com/">签证</a>、<a
          href="http://bx.qyer.com/">保险</a>、<a href="http://flight.qyer.com/">机票</a>、<a
          href="http://hotel.qyer.com/">酒店预订</a>、<a href="http://car.qyer.com/">租车</a>等服务。</p>
      </div>
      <div class="footer-links">
        <span>友情链接</span>

        <p>
          <a href="http://travel.ifeng.com/" target="_blank">凤凰网旅游</a>
          | <a href="http://www.caissa.com.cn/" target="_blank">凯撒旅游</a>
          | <a href="http://www.tourismvancouver.cn/" target="_blank">温哥华旅游局</a>
          | <a href="http://www.zuche.com/" target="_blank">神州租车</a>
          | <a href="http://www.huizuche.com/" target="_blank">国际租车</a>
          | <a href="http://you.ctrip.com/" target="_blank">携程攻略社区</a>
          | <a href="http://www.fengniao.com/" target="_blank">蜂鸟网</a>
          | <a href="http://www.fishtrip.cn/" target="_blank">大鱼自助游</a>
          | <a href="http://www.tianxun.com/" target="_blank">天巡国际机票</a>
          | <a href="http://www.youpu.cn" target="_blank">游谱旅行网 </a>
          | <a href="http://www.qianzhengdaiban.com/" target="_blank">中国签证资讯网</a>
          | <a href="http://www.dreams-travel.com/" target="_blank">梦之旅</a>
          | <a href="http://www.weilver.com/" target="_blank">微驴儿自由行</a>
          | <a href="http://www.9tour.cn/" target="_blank">九游网</a>
          | <a href="http://www.zglxw.com/" target="_blank">北京国旅官网</a>
          | <a href="http://www.ly.com/" target="_blank">同程旅游</a>
          | <a href="http://www.kuxun.cn" target="_blank">机票</a>
          | <a href="http://www.feiren.com/" target="_blank">腾邦国际</a>
          | <a href="http://www.meet99.com/" target="_blank">相约久久旅游网</a>
          | <a href="http://www.tuniu.com/" target="_blank">途牛旅游网</a>
          | <a href="http://www.mayi.com/" target="_blank">日租房</a>
          | <a href="http://www.aoyou.com" target="_blank">遨游网</a>
          | <a href="http://vacations.ctrip.com/" target="_blank">携程旅游网</a>
          | <a href="http://www.ch.com/" target="_blank">春秋航空</a>
          | <a href="http://bizhi.sogou.com/" target="_blank">搜狗壁纸</a>
          | <a href="http://www.8264.com/" target="_blank">户外资料网</a>
          | <a href="http://www.ailvxing.com/" target="_blank">爱旅行网</a>
          | <a href="http://www.toursforfun.com/" target="_blank">途风网</a>
          | <a href="http://www.guolv.com/" target="_blank">神舟国旅</a>
          | <a href="http://www.lavago.com/" target="_blank">拉拉勾旅游网</a>
          | <a href="http://www.114piaowu.com/" target="_blank">火车票</a>
          | <a href="http://www.ctcnn.com/" target="_blank">劲旅网</a>
          | <a href="http://www.uzai.com/" target="_blank">悠哉旅游网</a>
          | <a href="http://www.mipang.com/" target="_blank">米胖旅游网</a>
          | <a href="http://www.5fen.com/" target="_blank">五分旅游网</a>
          | <a href="http://www.lvye.cn/" target="_blank">绿野网</a>
          | <a href="http://www.tianqi.com/" target="_blank">天气预报15天查询</a>
          | <a href="http://www.eueueu.com/" target="_blank">走遍欧洲</a>
          | <a href="http://www.zhuna.cn/" target="_blank">酒店预订</a>
          | <a href="http://www.cncn.com/" target="_blank">欣欣旅游网</a>
          | <a href="http://www.lvmama.com" target="_blank">驴妈妈旅游网</a>
          | <a href="http://www.yododo.cn/" target="_blank">多多驿站</a>
          | <a href="http://trip.elong.com/" target="_blank">艺龙旅游指南</a>
        </p>
      </div>
    </div>
  </div>
</div>
</body>
</html>
